//
//  AlertView.swift
//  SmallParts
//
//  Created by 航汇聚 on 2019/11/29.
//  Copyright © 2019 BellaZhou. All rights reserved.
//

import UIKit

class AlertView: UIView, NibLoadable {
    @IBOutlet weak var messageLabel: UILabel!
     class func showStatus(_ message: String) {
        let instance = self.loadFromNib()
        instance.messageLabel.text = message
        UIApplication.shared.keyWindow?.addSubview(instance)
        UIView.animate(withDuration: 0.8, animations: {
            instance.transform = CGAffineTransform.identity.scaledBy(x: 0.99, y: 0.99)
        }) { (true) in
            instance.transform = CGAffineTransform.identity.scaledBy(x: 0.98, y: 0.98)
            instance.removeFromSuperview()
        }
    }
}
